package com.yh.patterns.factory.static_factory;

/**
 * @Auther:云尚学Java
 * 咖啡店类
 */
public class CoffeeStore {
    public Coffee orderCoffee(String type){

      /*  SimpleCoffeeFactory factory=new SimpleCoffeeFactory();
        //1.调用方法生产咖啡
        Coffee coffee = factory.createCoffee(type);*/
        Coffee coffee = SimpleCoffeeFactory.createCoffee(type);
        //2.加配料
        coffee.addSugar();
        coffee.addMilk();
        return coffee;
    }
}
